home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / PROGRAMM / PASCAL / 1462.ZIP / CHB-1.DOC < prev    next >
Text File  |  1988-11-05  |  8KB  |  174 lines

  1.                       KEYBOARD RETURN CODES
  2.  
  3. This appendix lists the keyboard codes for all the key combinations
  4. for the entire keyboard, as they are seen by the procedure READKBD.
  5. All keys are turned into either a one or two character code.
  6.  
  7. To understand the table below assume St is a two character string.
  8. St[0] is the length of the character code returned.  If the length of
  9. St is one then a normal ASCII character was pressed, otherwise an
  10. extended code is generated.  Notice that some of the keyboard codes do
  11. produce a two character code with the first character being null.
  12.  
  13. If the length of St is one then a normal ASCII character code was read
  14. from the keyboard.  This basically covers the ASCII values 32-127.
  15.  
  16. If the length of St is two then one of the keys, that are usually used
  17. for cursor control, was read from the keyboard.  If this is the case
  18. then St[1] will be either a 0 or 27 depending on the key combination
  19. read from the keyboard.
  20.  
  21. Use of the case statement works well with this type of setup to
  22. determine which keyboard keys were read from the keyboard.
  23.  
  24. Case Ch[1] Of
  25.    #00       : Writeln('Control code used.');
  26.    #27       : Writeln('Control code used.');
  27.    #32..#127 : Writeln('Printable code used.');
  28. End;
  29.  
  30.  
  31.  
  32.  
  33. Key                         Key
  34. Pressed   CH[0] CH[1] CH[2] Pressed   CH[0] CH[1] CH[2]
  35. --------- ----- ----- ----- --------- ----- ----- -----
  36. (space)      1    32     0  &            1    38     0
  37. !            1    33     0  '            1    39     0
  38. "            1    34     0  (            1    40     0
  39. #            1    35     0  )            1    41     0
  40. $            1    36     0  *            1    42     0
  41. %            1    37     0  +            1    43     0
  42.  
  43.  
  44. Key                         Key
  45. Pressed   CH[0] CH[1] CH[2] Pressed   CH[0] CH[1] CH[2]
  46. --------- ----- ----- ----- --------- ----- ----- -----
  47. ,            1    44     0  S            1    83     0
  48. -            1    45     0  T            1    84     0
  49. .            1    46     0  U            1    85     0
  50. /            1    47     0  V            1    86     0
  51. 0            1    48     0  W            1    87     0
  52. 1            1    49     0  X            1    88     0
  53. 2            1    50     0  Y            1    89     0
  54. 3            1    51     0  Z            1    90     0
  55. 4            1    52     0  [            1    91     0
  56. 5            1    53     0  \            1    92     0
  57. 6            1    54     0  ]            1    93     0
  58. 7            1    55     0  ^            1    94     0
  59. 8            1    56     0  _            1    95     0
  60. 9            1    57     0  `            1    96     0
  61. :            1    58     0  a            1    97     0
  62. ;            1    59     0  b            1    98     0
  63. <            1    60     0  c            1    99     0
  64. =            1    61     0  d            1   100     0
  65. >            1    62     0  e            1   101     0
  66. ?            1    63     0  f            1   102     0
  67. @            1    64     0  g            1   103     0
  68. A            1    65     0  h            1   104     0
  69. B            1    66     0  i            1   105     0
  70. C            1    67     0  j            1   106     0
  71. D            1    68     0  k            1   107     0
  72. E            1    69     0  l            1   108     0
  73. F            1    70     0  m            1   109     0
  74. G            1    71     0  n            1   110     0
  75. H            1    72     0  o            1   111     0
  76. I            1    73     0  p            1   112     0
  77. J            1    74     0  q            1   113     0
  78. K            1    75     0  r            1   114     0
  79. L            1    76     0  s            1   115     0
  80. M            1    77     0  t            1   116     0
  81. N            1    78     0  u            1   117     0
  82. O            1    79     0  v            1   118     0
  83. P            1    80     0  w            1   119     0
  84. Q            1    81     0  x            1   120     0
  85. R            1    82     0  y            1   121     0
  86.  
  87.  
  88.  
  89. Key                         Key
  90. Pressed   Ch[0] Ch[1] Ch[2] Pressed   Ch[0] Ch[1] Ch[2]
  91. --------- ----- ----- ----- --------- ----- ----- -----
  92. z            1   122     0  Alt-B        2    27    48
  93. {            1   123     0  Alt-N        2    27    49
  94. |            1   124     0  Alt-M        2    27    50
  95. }            1   125     0  F1           2    27    59
  96. ~            1   126     0  F2           2    27    60
  97. Ctrl-Break   2    27     0  F3           2    27    61
  98. Esc          2    27     1  F4           2    27    62
  99. Ctrl-2       2    27     3  F5           2    27    63
  100. BackSp       2    27     8  F6           2    27    64
  101. Tab          2    27     9  F7           2    27    65
  102. Ctrl-Enter   2    27    10  F8           2    27    66
  103. Enter        2    27    13  F9           2    27    67
  104. Ctrl-BS      2    27    14  F10          2    27    68
  105. Shft-Tab     2    27    15  Home         2    27    71
  106. Alt-Q        2    27    16  UArr         2    27    72
  107. Alt-W        2    27    17  PgUp         2    27    73
  108. Alt-E        2    27    18  LArr         2    27    75
  109. Alt-R        2    27    19  RArr         2    27    77
  110. Alt-T        2    27    20  End          2    27    79
  111. Alt-Y        2    27    21  DArr         2    27    80
  112. Alt-U        2    27    22  PgDn         2    27    81
  113. Alt-I        2    27    23  Ins          2    27    82
  114. Alt-O        2    27    24  Del          2    27    83
  115. Alt-P        2    27    25  Shft-F1      2    27    84
  116. Alt-A        2    27    30  Shft-F2      2    27    85
  117. Alt-S        2    27    31  Shft-F3      2    27    86
  118. Alt-D        2    27    32  Shft-F4      2    27    87
  119. Alt-F        2    27    33  Shft-F5      2    27    88
  120. Alt-G        2    27    34  Shft-F6      2    27    89
  121. Alt-H        2    27    35  Shft-F7      2    27    90
  122. Alt-J        2    27    36  Shft-F8      2    27    91
  123. Alt-K        2    27    37  Shft-F9      2    27    92
  124. Alt-L        2    27    38  Shft-F10     2    27    93
  125. Alt-Z        2    27    44  Ctrl-F1      2    27    94
  126. Alt-X        2    27    45  Ctrl-F2      2    27    95
  127. Alt-C        2    27    46  Ctrl-F3      2    27    96
  128. Alt-V        2    27    47  Ctrl-F4      2    27    97
  129.  
  130.  
  131.  
  132. Key                         Key
  133. Pressed   Ch[0] Ch[1] Ch[2] Pressed   Ch[0] Ch[1] Ch[2]
  134. --------- ----- ----- ----- --------- ----- ----- -----
  135. Ctrl-F5      2    27    98  Ctrl-F       2     0     6
  136. Ctrl-F6      2    27    99  Ctrl-G       2     0     7
  137. Ctrl-F7      2    27   100  Ctrl-H       2     0     8
  138. Ctrl-F8      2    27   101  Ctrl-I       2     0     9
  139. Ctrl-F9      2    27   102  Ctrl-J       2     0    10
  140. Ctrl-F10     2    27   103  Ctrl-K       2     0    11
  141. Alt-F1       2    27   104  Ctrl-L       2     0    12
  142. Alt-F2       2    27   105  Ctrl-M       2     0    13
  143. Alt-F3       2    27   106  Ctrl-N       2     0    14
  144. Alt-F4       2    27   107  Ctrl-O       2     0    15
  145. Alt-F5       2    27   108  Ctrl-P       2     0    16
  146. Alt-F6       2    27   109  Ctrl-Q       2     0    17
  147. Alt-F7       2    27   110  Ctrl-R       2     0    18
  148. Alt-F8       2    27   111  Ctrl-S       2     0    19
  149. Alt-F9       2    27   112  Ctrl-T       2     0    20
  150. Alt-F10      2    27   113  Ctrl-U       2     0    21
  151. Ctrl-LArr    2    27   115  Ctrl-V       2     0    22
  152. Ctrl-RArr    2    27   116  Ctrl-W       2     0    23
  153. Ctrl-End     2    27   117  Ctrl-X       2     0    24
  154. Ctrl-PgDn    2    27   118  Ctrl-Y       2     0    25
  155. Ctrl-Home    2    27   119  Ctrl-Z       2     0    26
  156. Alt-1        2    27   120  Ctrl-[       2     0    27
  157. Alt-2        2    27   121  Ctrl-\       2     0    28
  158. Alt-3        2    27   122  Ctrl-]       2     0    29
  159. Alt-4        2    27   123  Ctrl-6       2     0    30
  160. Alt-5        2    27   124  Ctrl--       2     0    31
  161. Alt-6        2    27   125
  162. Alt-7        2    27   126
  163. Alt-8        2    27   127
  164. Alt-9        2    27   128
  165. Alt-0        2    27   129
  166. Alt--        2    27   130
  167. Alt-=        2    27   131
  168. Ctrl-PgUp    2    27   132
  169. Ctrl-A       2     0     1
  170. Ctrl-B       2     0     2
  171. Ctrl-C       2     0     3
  172. Ctrl-D       2     0     4
  173. Ctrl-E       2     0     5
  174.